package com.xclink.sys.controller;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.xclink.common.entity.ConnomCount;
import com.xclink.common.entity.MonthEntity;
import com.xclink.common.utils.CountToDateUtil;
import com.xclink.sys.service.UserService;

//报表统计
@Controller
@RequestMapping("system/ubiao")
public class CountController {
	@Autowired
	 private  UserService userService;
	@RequestMapping
	public String index() {
		return "business/biao/index";
	}

	@RequestMapping("/biao")
	public String tbiao(){
		return "business/biao/biao";
	}
	@RequestMapping("/list")
	@ResponseBody
	public List<ConnomCount>  tobiao(){
		String year="2018";
		MonthEntity monthEntity=userService.selectMonth(year);
		return CountToDateUtil.toJson(monthEntity,year);
	}

}

